Skip to content

[chore]: move integration libs into peer deps#2101

Merged
seanmcguire12 merged 2 commits into
mainfrom
make-pw-peer-dep
May 11, 2026
Merged

[chore]: move integration libs into peer deps#2101
seanmcguire12 merged 2 commits into
mainfrom
make-pw-peer-dep

Conversation

@seanmcguire12
Copy link
Copy Markdown
Member

@seanmcguire12 seanmcguire12 commented May 9, 2026

why

  • pnpm installs optional deps by default, which meant installing stagehand would also pull in playwright-core, patchright-core, & puppeteer-core
  • these packages should be supplied by the consumer only if they want to use stagehand with an existing browser automation framework. they are otherwise not required
  • moving them into peer dependencies prevents unnecessary installs, & reflects a more accurate dependency graph

what changed

  • moved playwright-core, patchright-core, & puppeteer-core in packages/core from optional deps to optional peer deps

Summary by cubic

Moved playwright-core, patchright-core, and puppeteer-core to optional peer dependencies in @browserbasehq/stagehand to stop automatic installs and let consumers opt in only if needed. Also aligned playwright version ranges across packages.

  • Dependencies

    • In packages/core: moved playwright-core, patchright-core, puppeteer-core from optional deps to optional peer deps (all marked optional).
    • Updated internal dev deps to keep tests working: playwright, playwright-core, puppeteer-core, patchright-core.
    • Aligned playwright ranges: packages/evals uses >=1.55.1 <1.57.0; packages/server-v3 and packages/server-v4 use ^1.55.1.
  • Migration

    • If you use Stagehand with Playwright, add playwright-core@^1.55.1.
    • If you use Puppeteer, add puppeteer-core@^24.43.0.
    • If you use Patchright, add patchright-core@^1.55.2.

Written for commit dc726fc. Summary will update on new commits.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 9, 2026

🦋 Changeset detected

Latest commit: dc726fc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@browserbasehq/stagehand Patch
@browserbasehq/stagehand-evals Patch
@browserbasehq/stagehand-server-v3 Patch
@browserbasehq/stagehand-server-v4 Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 6 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.
Architecture diagram
sequenceDiagram
    participant Consumer as Consumer Project
    participant Pkg as @browserbasehq/stagehand
    participant Core as packages/core
    participant Playwright as playwright-core
    participant Puppeteer as puppeteer-core
    participant Patchright as patchright-core
    participant Evals as packages/evals
    participant ServerV3 as packages/server-v3
    participant ServerV4 as packages/server-v4

    Note over Consumer,Core: Dependency Resolution Flow

    Consumer->>Pkg: install @browserbasehq/stagehand
    Pkg->>Core: resolve dependencies
    alt Consumer uses Playwright
        Core->>Playwright: optional peer dep: ^1.55.1
        alt Playwright not installed
            Core->>Core: skip Playwright-specific features
        else Playwright installed
            Core->>Playwright: use for browser automation
        end
    end
    alt Consumer uses Puppeteer
        Core->>Puppeteer: optional peer dep: ^24.43.0
        alt Puppeteer not installed
            Core->>Core: skip Puppeteer-specific features
        else Puppeteer installed
            Core->>Puppeteer: use for browser automation
        end
    end
    alt Consumer uses Patchright
        Core->>Patchright: optional peer dep: ^1.55.2
        alt Patchright not installed
            Core->>Core: skip Patchright-specific features
        else Patchright installed
            Core->>Patchright: use for browser automation
        end
    end

    Note over Core,ServerV4: Internal Dev Dependencies (not shipped)

    Core->>Core: devDependencies for testing
    Core->>Playwright: devDep: ^1.55.1
    Core->>Puppeteer: devDep: ^24.43.0
    Core->>Patchright: devDep: ^1.55.2

    Evals->>Playwright: devDep: >=1.55.1 <1.57.0
    ServerV3->>Playwright: dep: ^1.55.1
    ServerV4->>Playwright: dep: ^1.55.1
Loading

@seanmcguire12 seanmcguire12 merged commit 26e6c96 into main May 11, 2026
212 checks passed
@github-actions github-actions Bot mentioned this pull request May 11, 2026
miguelg719 pushed a commit that referenced this pull request May 11, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @browserbasehq/stagehand@3.4.0

### Minor Changes

- [#2084](#2084)
[`0641d44`](0641d44)
Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - add
ignoreSelectors param to extract()

- [#2096](#2096)
[`a11603d`](a11603d)
Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - add
ignoreSelectors to observe()

### Patch Changes

- [#2080](#2080)
[`21c78b3`](21c78b3)
Thanks [@miguelg719](https://github.com/miguelg719)! - Add variables
support to v3 agentExecute API schema and remove experimental
requirement

- [#2077](#2077)
[`f437f73`](f437f73)
Thanks [@monadoid](https://github.com/monadoid)! - Fix frame registry
handling for OOPIF pages

- [#2098](#2098)
[`a783b99`](a783b99)
Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - bump
transitive deps to patched versions

- [#2089](#2089)
[`8d2f354`](8d2f354)
Thanks [@shrey150](https://github.com/shrey150)! - Strengthen observe
prompts so LLMs return complete encoded element IDs.

- [#2047](#2047)
[`a87c1fc`](a87c1fc)
Thanks [@tkattkat](https://github.com/tkattkat)! - Set default agent
mode to hybrid with auto routing to dom for non compatible models

- [#2101](#2101)
[`26e6c96`](26e6c96)
Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - move
playwright-core, puppeteer-core, patchright-core from optional
dependencies to peer dependencies

- [#2068](#2068)
[`1d176c4`](1d176c4)
Thanks [@filip-michalsky](https://github.com/filip-michalsky)! - Remove
the default temperature setting from v3 agent AI SDK calls so reasoning
models that do not support temperature run without provider warnings.

- [#2040](#2040)
[`1fa9613`](1fa9613)
Thanks [@monadoid](https://github.com/monadoid)! - Prefer
`STAGEHAND_API_URL` for Stagehand API overrides while retaining
`STAGEHAND_BASE_URL` as a deprecated fallback.

- [#2065](#2065)
[`9ff70dd`](9ff70dd)
Thanks [@miguelg719](https://github.com/miguelg719)! - Add support for
CUA models: openai/gpt-5.4-mini, openai/gpt-5.5, and
anthropic/claude-haiku-4-5

- [#2039](#2039)
[`7640381`](7640381)
Thanks [@monadoid](https://github.com/monadoid)! - Deprecate Browserbase
project ID configuration.

## @browserbasehq/stagehand-evals@2.0.1

### Patch Changes

- Updated dependencies
\[[`21c78b3`](21c78b3),
[`0641d44`](0641d44),
[`f437f73`](f437f73),
[`a783b99`](a783b99),
[`8d2f354`](8d2f354),
[`a11603d`](a11603d),
[`a87c1fc`](a87c1fc),
[`26e6c96`](26e6c96),
[`1d176c4`](1d176c4),
[`1fa9613`](1fa9613),
[`9ff70dd`](9ff70dd),
[`7640381`](7640381)]:
    -   @browserbasehq/stagehand@3.4.0

## @browserbasehq/stagehand-server-v3@3.6.4

### Patch Changes

- [#2098](#2098)
[`a783b99`](a783b99)
Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - bump
transitive deps to patched versions

- [#2091](#2091)
[`de132bc`](de132bc)
Thanks [@pirate](https://github.com/pirate)! - Default the v3 server
listener to localhost, respect explicit HOST values, and warn when
HOST=0.0.0.0 exposes all interfaces.

- [#2040](#2040)
[`1fa9613`](1fa9613)
Thanks [@monadoid](https://github.com/monadoid)! - Prefer
`STAGEHAND_API_URL` for Stagehand API overrides while retaining
`STAGEHAND_BASE_URL` as a deprecated fallback.

- [#2094](#2094)
[`4a808c4`](4a808c4)
Thanks [@monadoid](https://github.com/monadoid)! - Make the model API
key optional in the v3 OpenAPI security requirements.

- [#2039](#2039)
[`7640381`](7640381)
Thanks [@monadoid](https://github.com/monadoid)! - Deprecate Browserbase
project ID configuration.

- Updated dependencies
\[[`21c78b3`](21c78b3),
[`0641d44`](0641d44),
[`f437f73`](f437f73),
[`a783b99`](a783b99),
[`8d2f354`](8d2f354),
[`a11603d`](a11603d),
[`a87c1fc`](a87c1fc),
[`26e6c96`](26e6c96),
[`1d176c4`](1d176c4),
[`1fa9613`](1fa9613),
[`9ff70dd`](9ff70dd),
[`7640381`](7640381)]:
    -   @browserbasehq/stagehand@3.4.0

## @browserbasehq/stagehand-server-v4@3.6.4

### Patch Changes

- [#2098](#2098)
[`a783b99`](a783b99)
Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - bump
transitive deps to patched versions

- Updated dependencies
\[[`21c78b3`](21c78b3),
[`0641d44`](0641d44),
[`f437f73`](f437f73),
[`a783b99`](a783b99),
[`8d2f354`](8d2f354),
[`a11603d`](a11603d),
[`a87c1fc`](a87c1fc),
[`26e6c96`](26e6c96),
[`1d176c4`](1d176c4),
[`1fa9613`](1fa9613),
[`9ff70dd`](9ff70dd),
[`7640381`](7640381)]:
    -   @browserbasehq/stagehand@3.4.0

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants